package edu.hwadee.entity;

import java.util.Date;

/**
 * EmdepreciationId entity. @author MyEclipse Persistence Tools
 */

public class EmdepreciationId implements java.io.Serializable {

	// Fields

	private Em em;
	private Integer emdepreciationId;
	private Date depreciationDate;
	private Float initialValue;
	private Float finalValue;
	private Float depreciationValue;

	// Constructors

	/** default constructor */
	public EmdepreciationId() {
	}

	/** full constructor */
	public EmdepreciationId(Em em, Integer emdepreciationId, Date depreciationDate, Float initialValue,
			Float finalValue, Float depreciationValue) {
		this.em = em;
		this.emdepreciationId = emdepreciationId;
		this.depreciationDate = depreciationDate;
		this.initialValue = initialValue;
		this.finalValue = finalValue;
		this.depreciationValue = depreciationValue;
	}

	// Property accessors

	public Em getEm() {
		return this.em;
	}

	public void setEm(Em em) {
		this.em = em;
	}

	public Integer getEmdepreciationId() {
		return this.emdepreciationId;
	}

	public void setEmdepreciationId(Integer emdepreciationId) {
		this.emdepreciationId = emdepreciationId;
	}

	public Date getDepreciationDate() {
		return this.depreciationDate;
	}

	public void setDepreciationDate(Date depreciationDate) {
		this.depreciationDate = depreciationDate;
	}

	public Float getInitialValue() {
		return this.initialValue;
	}

	public void setInitialValue(Float initialValue) {
		this.initialValue = initialValue;
	}

	public Float getFinalValue() {
		return this.finalValue;
	}

	public void setFinalValue(Float finalValue) {
		this.finalValue = finalValue;
	}

	public Float getDepreciationValue() {
		return this.depreciationValue;
	}

	public void setDepreciationValue(Float depreciationValue) {
		this.depreciationValue = depreciationValue;
	}

	public boolean equals(Object other) {
		if ((this == other))
			return true;
		if ((other == null))
			return false;
		if (!(other instanceof EmdepreciationId))
			return false;
		EmdepreciationId castOther = (EmdepreciationId) other;

		return ((this.getEm() == castOther.getEm())
				|| (this.getEm() != null && castOther.getEm() != null && this.getEm().equals(castOther.getEm())))
				&& ((this.getEmdepreciationId() == castOther.getEmdepreciationId())
						|| (this.getEmdepreciationId() != null && castOther.getEmdepreciationId() != null
								&& this.getEmdepreciationId().equals(castOther.getEmdepreciationId())))
				&& ((this.getDepreciationDate() == castOther.getDepreciationDate())
						|| (this.getDepreciationDate() != null && castOther.getDepreciationDate() != null
								&& this.getDepreciationDate().equals(castOther.getDepreciationDate())))
				&& ((this.getInitialValue() == castOther.getInitialValue())
						|| (this.getInitialValue() != null && castOther.getInitialValue() != null
								&& this.getInitialValue().equals(castOther.getInitialValue())))
				&& ((this.getFinalValue() == castOther.getFinalValue()) || (this.getFinalValue() != null
						&& castOther.getFinalValue() != null && this.getFinalValue().equals(castOther.getFinalValue())))
				&& ((this.getDepreciationValue() == castOther.getDepreciationValue())
						|| (this.getDepreciationValue() != null && castOther.getDepreciationValue() != null
								&& this.getDepreciationValue().equals(castOther.getDepreciationValue())));
	}

	public int hashCode() {
		int result = 17;

		result = 37 * result + (getEm() == null ? 0 : this.getEm().hashCode());
		result = 37 * result + (getEmdepreciationId() == null ? 0 : this.getEmdepreciationId().hashCode());
		result = 37 * result + (getDepreciationDate() == null ? 0 : this.getDepreciationDate().hashCode());
		result = 37 * result + (getInitialValue() == null ? 0 : this.getInitialValue().hashCode());
		result = 37 * result + (getFinalValue() == null ? 0 : this.getFinalValue().hashCode());
		result = 37 * result + (getDepreciationValue() == null ? 0 : this.getDepreciationValue().hashCode());
		return result;
	}

}